package sapling.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import java.util.Date;


/**
 * Created by Administrator on 2017/6/2.
 */
@Entity
@Getter
@Setter
public class TreeWell {
    public static final int TYPE_TREEWELL_J =1;//#字形种植方式
    public static final int TYPE_TREEWELL_P =2;//品字形种植方式
    public static final int TYPE_REVTREEWELL_P=3;//倒品字

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    private Long treeWell_id;
    private String serialNumber;//编号
    int row;//行
    int line;//列
    double rowdistance;//行距离
    double linedistance;//列距离
    private double radii;//树坑半径
    private int useState;//树坑使用状态 0、未使用 1、已占用
    @ManyToOne
    @JoinColumn(name = "landMass_id", referencedColumnName = "id")
    @JsonIgnore
    private LandMass landMass;//所属地块
    private long tree_id;//树的id
    private boolean isuse;
    @Temporal(TemporalType.TIMESTAMP)
    @UpdateTimestamp
    @JsonIgnore
    private Date updateTime;
}
